import Ember from 'ember';
import menuFilter from 'emberworkspace/utils/menu-filter';

var allTasks = [
    {linkTitle: "当前连接的worker", linkName: "mconsole.working-workers", roles: ["ROLE_USER_MANAGER"]},
    {linkTitle: "回调状态监视", linkName: "mconsole.reporting", roles: ["ROLE_USER_MANAGER"]}
  ];

export default Ember.Controller.extend({
  userState: Ember.inject.service('user-state'),
  tasks: Ember.computed(function(){
    var u = this.get('userState').get('user');
    return menuFilter(u, allTasks);
  })
});
